Avoid warnings when widgets are not created yet
authorMatthias Clasen <mclasen@redhat.com>
Mon, 29 Aug 2011 02:30:24 +0000 (22:30 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 29 Aug 2011 02:30:24 +0000 (22:30 -0400)
This widget is created on-demand, so we can not unconditionally
set its sensitivity in some other place.

gtk/gtkfilechooserdefault.c

index b49484089aff8fd2c5344ef7a56c2a564032df7a..7eaaef28302e80977e2d912da59dc9db289895b0 100644 (file)
@@ -4096,7 +4096,8 @@ check_copy_file_location_sensitivity (GtkFileChooserDefault *impl)
   else
     active = TRUE;
 
-  gtk_widget_set_sensitive (impl->browse_files_popup_menu_copy_file_location_item, active);
+  if (impl->browse_files_popup_menu_copy_file_location_item)
+    gtk_widget_set_sensitive (impl->browse_files_popup_menu_copy_file_location_item, active);
 }
 
 /* Constructs the popup menu for the file list if needed */